import request from '@/utils/iasServiceRequest'

// 添加或者更新类型3规则
export function addOrUpdateRule3(rule3) {
  return request({
    url: '/rules/rule3',
    method: 'post',
    params: rule3
  })
}

// 获取规则3信息
export function findRule3(ruleId) {
  return request({
    url: '/rules/rule3/' + ruleId,
    method: 'get',
    params: null
  })
}

// 删除类型3规则
export function deleteRule3(ruleId) {
  return request({
    url: '/rules/rule3/' + ruleId,
    method: 'delete',
    params: null
  })
}

// 删除类型3规则
export function batchDeleteRule3(ruleIds) {
  return request({
    url: '/rules/rule3s',
    method: 'delete',
    params: ruleIds
  })
}

// 获取规则3应用类型
export function findRule3ApplyTypes() {
  return request({
    url: '/rules/rule3/applyTypes',
    method: 'get',
    params: null
  })
}

// 获取规则3 所支持的所有表格名称
export function findRuleSheetNames() {
  return request({
    url: '/rules/rule/sheets',
    method: 'get',
    params: null
  })
}

// 更加表格名称，列号，获取规则3 表格列名
export function findRuleSheetColumnName(sheetVariableName, columnIndex) {
  return request({
    url: '/rules/rule/sheet/columnName?sheetVariableName=' + sheetVariableName + '&columnIndex=' + columnIndex,
    method: 'get',
    params: null
  })
}

// 获取规则3 所支持的所有表格名称
export function findAllJudgementTypes() {
  return request({
    url: '/rules/rule3/judgementTypes',
    method: 'get',
    params: null
  })
}
